﻿using Common.Device.Enums;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.ViewModels
{
    public class ShiBoQiViewModel:BindableBase
    {
        private int menuIndex = 0;
        /// <summary>
        /// 菜单索引
        /// </summary>
        public int MenuIndex
        {
            get { return menuIndex; }
            set { SetProperty(ref menuIndex, value); }
        }
        private ObservableCollection<int> channels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 通道集合
        /// </summary>
        public ObservableCollection<int> Channels
        {
            get { return channels; }
            set { SetProperty(ref channels, value); }
        }
        private int vppChannel = 1;
        /// <summary>
        /// 峰峰值通道
        /// </summary>
        public int VppChannel
        {
            get { return vppChannel; }
            set { SetProperty(ref vppChannel, value); }
        }
        private List<string> vols = Enum.GetNames(typeof(ShiBoQiEnum.VolDiv)).ToList();
        /// <summary>
        /// 电压挡位集合
        /// </summary>
        public List<string> Vols
        {
            get { return vols; }
            set { SetProperty(ref vols, value); }
        }
        private List<string> times = Enum.GetNames(typeof(ShiBoQiEnum.TimeDiv)).ToList();
        /// <summary>
        /// 时基挡位集合
        /// </summary>
        public List<string> Times
        {
            get { return times; }
            set { SetProperty(ref times, value); }
        }
        private List<string> coups = Enum.GetNames(typeof(ShiBoQiEnum.Coup)).ToList();
        /// <summary>
        /// 耦合方式集合
        /// </summary>
        public List<string> Coups
        {
            get { return coups; }
            set { SetProperty(ref coups, value); }
        }
        private List<string> limits = Enum.GetNames(typeof(ShiBoQiEnum.Limit)).ToList();
        /// <summary>
        /// 带宽限制方式集合
        /// </summary>
        public List<string> Limits
        {
            get { return limits; }
            set { SetProperty(ref limits, value); }
        }
        private string vppVol = ShiBoQiEnum.VolDiv._2mV.ToString();
        /// <summary>
        /// 峰峰值电压挡位
        /// </summary>
        public string VppVol
        {
            get { return vppVol; }
            set { SetProperty(ref vppVol, value); }
        }
        private string vppTime = ShiBoQiEnum.TimeDiv._1mS.ToString();
        /// <summary>
        /// 峰峰值时基挡位
        /// </summary>
        public string VppTime
        {
            get { return vppTime; }
            set { SetProperty(ref vppTime, value); }
        }
        private string vppCoup = ShiBoQiEnum.Coup.DC.ToString();
        /// <summary>
        /// 峰峰值耦合方式
        /// </summary>
        public string VppCoup
        {
            get { return vppCoup; }
            set { SetProperty(ref vppCoup, value); }
        }
        private string vppLimit = ShiBoQiEnum.Limit._20M.ToString();
        /// <summary>
        /// 峰峰值带宽限制
        /// </summary>
        public string VppLimit
        {
            get { return vppLimit; }
            set { SetProperty(ref vppLimit, value); }
        }
        private string vppMin = null;
        /// <summary>
        /// 峰峰值最小值
        /// </summary>
        public string VppMin
        {
            get { return vppMin; }
            set { SetProperty(ref vppMin, value); }
        }
        private string vppMax = null;
        /// <summary>
        /// 峰峰值最大值
        /// </summary>
        public string VppMax
        {
            get { return vppMax; }
            set { SetProperty(ref vppMax, value); }
        }
        private int waitTime;
        /// <summary>
        /// 等待采集时间
        /// </summary>
        public int WaitTime
        {
            get { return waitTime; }
            set { SetProperty(ref waitTime, value); }
        }
    }
}
